package cn.kbyue.exceptiondemo.dto;

import cn.kbyue.exceptiondemo.common.validate.EnumValue;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @author xlang
 * @date 2023/4/4 9:12
 */
@Data
public class UserDTO implements Serializable {

    @NotBlank(message = "用户名不能为空")
    @Size(message = "长度不能超过 {max} 个字符", max = 6)
    private String username;

    @EnumValue(message = "账户状态只能是0, 1", intValues = {0,1})
    private Integer active;

}
